home *** CD-ROM | disk | FTP | other *** search
/ Interactive Media Design Review 1999 / Interactive Media Design Review 1999.iso / pc / Demos / Bombardier_PC / BSCRIPTS.CST / 00106_Script_slideTourButton < prev    next >
Text File  |  1999-04-25  |  3KB  |  141 lines

  1. -- ⌐ 1998 @radical.media, inc. & Concurrent New Media Group, L.L.C.
  2. -- Developed for Bombardier, Inc.
  3. --
  4. -- All programming developed by: 
  5. -- Robert Fabricant, Valerie Valoueva, Ossi Shaked, 
  6. -- Henry Sauvageot, Chris Howell & Chris Girand
  7. --
  8. -- Use of this code by parties other than @radical.media, inc. or their
  9. --agents 
  10. -- without the express written consent of @radical.media, inc. AND Concurrent 
  11. -- New Media Group, L.L.C. is strictly prohibited.
  12. ------------------------------------------------------
  13.  
  14.  
  15. property mySprite, NeutralName, RolloverName, startAnimation,¼
  16.          AnimationIsOver,planeName,memberCount
  17.  
  18.  
  19. on new me
  20.   set startAnimation = FALSE
  21.   set AnimationIsOver = FALSE
  22.   set mySprite = the spriteNum of me
  23.   set NeutralName = getNeutralName(me, mySprite)
  24.   set RolloverName = NeutralName&"-rol"
  25.   set planeName = getPlaneName (me)
  26. end
  27.  
  28. on getPlaneName me
  29.   set Name = NeutralName
  30.   repeat with i =  the Number of Chars in Name down to 1
  31.     if char i of Name <> "_" then 
  32.       delete char i of Name
  33.     else
  34.       delete char i of Name
  35.       exit repeat
  36.     end if
  37.   end repeat
  38.   
  39.   return Name
  40.   
  41. end
  42.  
  43.  
  44. on mouseEnter me
  45.   if not AnimationIsOver then
  46.     set the member of sprite mySprite = member  RolloverName
  47.     if startAnimation = FALSE then puppetsound 3, "mouse2a"
  48.   end if
  49. end
  50.  
  51. on mouseLeave me
  52.   if not AnimationIsOver then
  53.     set the member of sprite mySprite = member  NeutralName
  54.   end if
  55. end
  56.  
  57. on mouseUp me
  58.   sound stop 1
  59.   sound stop 2
  60.   clearpups
  61.   set startAnimation = TRUE
  62.   puppetsound 3,"hydmach"
  63. end
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70. on getNeutralName me,SpriteNum
  71.   set aMember = the member of sprite spriteNum
  72.   set Name = the name of member aMember
  73.   if Name contains "-" then
  74.     repeat with i = the Number of Chars of Name down to 1
  75.       if char i of Name <> "-" then 
  76.         delete char i of Name
  77.       else
  78.         delete char i of Name
  79.         exit repeat
  80.       end if
  81.     end repeat
  82.   end if
  83.   
  84.   return Name
  85.   
  86. end
  87.  
  88.  
  89. on exitFrame me
  90.   if startAnimation then
  91.     slideButton me 
  92.   end if
  93.   if AnimationIsOver then 
  94.     oldScript me
  95.     oldMouseUp me
  96.   end if
  97.   
  98. end
  99.  
  100.  
  101. on slideButton me
  102.   repeat with memberCount = 0 to 14
  103.     set the member of sprite mySprite = memberCount&"-"&planeName
  104.     updatestage
  105.   end repeat
  106.   set startAnimation = FALSE 
  107.   set AnimationIsOver = TRUE
  108. end
  109.  
  110.  
  111. on oldScript me
  112.   global gFrame, menuController
  113.   set gFrame=the frame
  114.   sound stop(1)
  115.   sound stop(2)
  116.   if IsQTVRMovie(gQTVRObj) then 
  117.     getview
  118.     closemovie
  119.   end if
  120.   deselect menuController
  121. end
  122.  
  123. on oldMouseUp me
  124.   global Fqtvr
  125.   resetInfo
  126.   if Fqtvr = "" then
  127.     set Fqtvr="no"  
  128.   end if
  129.   go to "flash"
  130. end
  131.  
  132. on enterFrame me
  133.   --Hide this button in cabin details section, if we got there from QTVR interior
  134.   global comefromQTVR
  135.   if comefromQTVR then 
  136.     if the frameLabel contains "detail" then
  137.       set the loc of sprite mySprite = point(-1000,-1000)
  138.     end if
  139.   end if
  140. end
  141.